<?php
include("../seguranca.php"); // Inclui o arquivo com o sistema de segurança
protegePagina(); // Chama a função que protege a página
?>
<!DOCTYPE html lang="pt-BR">
<head>    
<link href="../style/esquema.css" rel="stylesheet">
<script type="text/javascript" src="../script/script.js"></script>
<meta charset="UTF-8">
<title>Wise-Car</title>
</head>

<body>
<div align="right" class="geral">
   	<div id="content" align="center">
    <div class="logoff">
    <a href="http://localhost/wisecar/view/index.php"><input class="botaoSair" type="button" value="Home"></a>
    <a href="http://localhost/wisecar/index.php"><input class="botaoSair" type="button" value="Logoff"></a>
    </div>
    <h1>Cadastrar Funcionário</h1>
<form action="../controller/registrarFuncionario.php" method="post">
				<table align="center" cellpadding="2" cellspacing="2">
					<tr>
						<td align="left">Nome </td>
						<td>
							<input type="text" readonly required name="nome" value="<?php echo $_SESSION['newNome']; ?>" id="nomeID">
						</td>
					</tr>
					<tr>
						<td align="left">CPF</td>
						<td>
							
							<input type="text" value ="" required name="cpf" id="Cpf" onkeypress="return isNumber(this)" onKeyUp="return mascaraCpf(this.value);" maxlength="14"/>
						</td>
					</tr>
					<tr>
						<td align="left">RG</td>
						<td>
							
							<input type="text" required name="rg" id="rgID" onkeypress="return isNumber(this)" maxlength="20"/>
						</td>
					</tr>
					<tr>
						<td align="left">Usuário</td>
						<td>
							<input type="text" required name="usuario" id="usuarioID">
						</td>
					</tr>
					<tr>
						<td align="left">Senha</td>
						<td>
							<input type="password" required name="senha" id="senhaID">
						</td>
					</tr>
					<tr>
						<td align="left">Data Nascimento</td>
						<td>
							<input type="date" required name="dataNasc" id="dataNascID">
						</td>
					</tr>
					<tr>
						<td align="left">E-mail:</td>
						<td>
							<input type="email" required name="email" id="emailID">
						</td>
					</tr>
					<tr>
						<td align="left">Telefone Fixo:</td>
						<td>
							<input type="text" name="telFixo" onKeyPress="return isNumber(this);" id="telFixoID">
						</td>
					</tr>
					<tr>
						<td align="left">Celular:</td>
						<td>
							<input type="text" name="celular" onKeyPress="return isNumber(this);" id="celularID">
						</td>
					</tr>
					<tr>
						<td align="left">Endereço</td>
						<td>
							<input type="text" required name="endereco" id="enderecoID">
                        </td>
					</tr>
					<tr>
						<td align="left">Data de Contratação:</td>
						<td><input type="date" required name="dataContratacao" id="dataContratacaoID"></td>
					</tr>
					<tr>
						<td>Tipo de perfil</td>
						<td align="left">
							<select required name="perfil_id" id="tipoID">
								<option value="" selected></option>
								<option value="1">Gerente</option>
								<option value="2">Funcionário</option>
							</select>
						</td>
					</tr>
					<tr><td colspan="2" align="center">
							<input type="submit" value="Enviar">
							<input type="reset" value="Limpar">
						</td></tr>		
				</table>
            </form>
	</div>
</div>
</body>
</html>